home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Winzipper
/
Winzipper_ISO.iso
/
network
/
brightworks 2.0
/
BSC200.Z
/
TESTDLG2.DCL
< prev
next >
Wrap
Text File
|
1994-01-19
|
2KB
|
69 lines
'***************************************************************************************
' Testdlg2.dcl is a script that displays a dialog box with various types including
' text, edit box, pushbuttons, radio buttons check box, group box, combo and listbox
'
' Created by Automated Design Systems
' (C) Copyright Automated Design Systems 1988 - 1994 All Rights Reserved
'****************************************************************************************
sub main()
'example of a dialog box with all types of controls in it
Dim ListBox1$() as string
Dim ComboBox1$() as string
Dim stf$ as string ' static text variable
stf$ = "SAMPLE TEXT FIELD"
' in the example below, note how the Text field uses the
' variable declared above to get its field name. this can
' be done for any of the dialog control types except:
' OKButton, CancelButton, TextBox
'
' it should also be noted that the variable must have a
' value assigned BEFORE the dialog box is defined as
' illustrated here
Begin Dialog UserDialog 16,32,304,168, "Sample Dialog Box"
OKButton 251,9,44,14
CancelButton 252,30,44,14
PushButton 252,51,44,14, "Pushbutton1"
PushButton 252,73,44,14, "PushButton2"
GroupBox 13,9,84,59, "Sample Group Box"
OptionGroup .OptionGroup1
OptionButton 21,24,65,14, "Option 1"
OptionButton 21,44,66,14, "Option 2"
CheckBox 15,78,79,14, "Sample Checkbox", .CheckBox1
Text 14,105,79,8, stf$
TextBox 16,120,81,12, .TextBox1
ListBox 114,14,120,48, ListBox1$, .ListBox1
ComboBox 113,68,120,84, ComboBox1$, .ComboBox1
End Dialog
Dim aSampleDialog as UserDialog 'declare the dialog variable
AppList ComboBox1$
AppList ListBox1$
a% = Dialog(aSampleDialog) 'display the dialog
crlf$ = chr$(13)+chr$(10)
dlgstr$ = "Button pushed = "
select case a%
case -1
dlgstr$ = dlgstr$ + "OK"
case 0
dlgstr$ = dlgstr$ + "Cancel"
case 1
dlgstr$ = dlgstr$ + "PushButton1"
case 2
dlgstr$ = dlgstr$ + "PushButton2"
end select
dlgstr$ = dlgstr$ + crlf$
dlgstr$ = dlgstr$ + "Option = " + str$(aSampleDialog.OptionGroup1) + crlf$
dlgstr$ = dlgstr$ + "Checkbox = " + str$(aSampleDialog.CheckBox1) + crlf$
dlgstr$ = dlgstr$ + "TextBox = " + aSampleDialog.TextBox1 + crlf$
dlgstr$ = dlgstr$ + "ListBox = " + ListBox1$(aSampleDialog.ListBox1) + crlf$
dlgstr$ = dlgstr$ + "ComboBox = " + aSampleDialog.ComboBox1
msgbox dlgstr$
end sub